package cn.wolfcode.wolf2w.business.config;


import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class StrategyRabbitConfig {
    @Bean
    public Queue strategyQueue(){
        return new Queue("strategyQueue", true,false, false);
    }

    @Bean
    public TopicExchange strategyExchange(){
        return new TopicExchange("strategyExchange", true, false);
    }

    //绑定
    @Bean
    public Binding strategyBinding(){
        return new Binding("strategyQueue", Binding.DestinationType.QUEUE,
                "strategyExchange", "strategy.#", null);
    }


}
